home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / Graf3D.p < prev    next >
Encoding:
Text File  |  1991-04-05  |  2.2 KB  |  109 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {
  4. Created: Monday, January 7, 1991 at 6:00 AM
  5.     Graf3D.p
  6.     Pascal Interface to the Macintosh Libraries
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10. }
  11.  
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes := 0}
  15. {$ENDC}
  16.  
  17.  
  18.     UNIT Graf3D;
  19.     INTERFACE USES
  20.         Types, Quickdraw;
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. CONST
  35. radConst = 3754936;
  36.  
  37. TYPE
  38. Point3D = RECORD
  39.     x: Fixed;
  40.     y: Fixed;
  41.     z: Fixed;
  42.     END;
  43.  
  44. Point2D = RECORD
  45.     x: Fixed;
  46.     y: Fixed;
  47.     END;
  48.  
  49. XfMatrix = ARRAY [0..3, 0..3] OF Fixed;
  50.  
  51. Port3DPtr = ^Port3D;
  52. Port3DHandle = ^Port3DPtr;
  53. Port3D = RECORD
  54.     grPort: GrafPtr;
  55.     viewRect: Rect;
  56.     xLeft: Fixed;
  57.     yTop: Fixed;
  58.     xRight: Fixed;
  59.     yBottom: Fixed;
  60.     pen: Point3D;
  61.     penPrime: Point3D;
  62.     eye: Point3D;
  63.     hSize: Fixed;
  64.     vSize: Fixed;
  65.     hCenter: Fixed;
  66.     vCenter: Fixed;
  67.     xCotan: Fixed;
  68.     yCotan: Fixed;
  69.     ident: BOOLEAN;
  70.     xForm: XfMatrix;
  71.     END;
  72.  
  73.  
  74. PROCEDURE InitGrf3d(port: Port3DHandle);
  75. PROCEDURE Open3DPort(port: Port3DPtr);
  76. PROCEDURE SetPort3D(port: Port3DPtr);
  77. PROCEDURE GetPort3D(VAR port: Port3DPtr);
  78. PROCEDURE MoveTo2D(x: Fixed;y: Fixed);
  79. PROCEDURE MoveTo3D(x: Fixed;y: Fixed;z: Fixed);
  80. PROCEDURE LineTo2D(x: Fixed;y: Fixed);
  81. PROCEDURE Move2D(dx: Fixed;dy: Fixed);
  82. PROCEDURE Move3D(dx: Fixed;dy: Fixed;dz: Fixed);
  83. PROCEDURE Line2D(dx: Fixed;dy: Fixed);
  84. PROCEDURE Line3D(dx: Fixed;dy: Fixed;dz: Fixed);
  85. PROCEDURE ViewPort(r: Rect);
  86. PROCEDURE LookAt(left: Fixed;top: Fixed;right: Fixed;bottom: Fixed);
  87. PROCEDURE ViewAngle(angle: Fixed);
  88. PROCEDURE Identity;
  89. PROCEDURE Scale(xFactor: Fixed;yFactor: Fixed;zFactor: Fixed);
  90. PROCEDURE Translate(dx: Fixed;dy: Fixed;dz: Fixed);
  91. PROCEDURE Pitch(xAngle: Fixed);
  92. PROCEDURE Yaw(yAngle: Fixed);
  93. PROCEDURE Roll(zAngle: Fixed);
  94. PROCEDURE Skew(zAngle: Fixed);
  95. PROCEDURE Transform(src: Point3D;VAR dst: Point3D);
  96. FUNCTION Clip3D(src1: Point3D;src2: Point3D;VAR dst1: Point;VAR dst2: Point): INTEGER;
  97. PROCEDURE SetPt3D(VAR pt3D: Point3D;x: Fixed;y: Fixed;z: Fixed);
  98. PROCEDURE SetPt2D(VAR pt2D: Point2D;x: Fixed;y: Fixed);
  99. PROCEDURE LineTo3D(x: Fixed;y: Fixed;z: Fixed);
  100.  
  101.  
  102.     { UsingGraf3D }
  103.  
  104.  
  105.     IMPLEMENTATION
  106. END.
  107.  
  108.  
  109.